It is ideal for agricultural producers to predict the harvest time and yield of agricultural products in an early stage in order to achieve the delivery time and amount that are specified in advance in the contract with the purchaser of agricultural products. One way to make such harvest predictions is to regularly check the weight distribution of agricultural products during their growth. The weight distribution is a frequency distribution obtained by measuring the weight of each agricultural product and represented by a graph with the weight on the horizontal axis and the number of agricultural products on the vertical axis. However, for making such harvest predictions, the weights of a large number of agricultural products need to be measured individually.
In view of this problem, there has been proposed a method that calculates the area of each potato based on an image of harvested potatoes captured by a digital camera, and estimates the weight of each potato on the basis of the calculated area. The area of each potato may be calculated based on the contour of each potato captured in the image.
Further, as a method for extracting the contour of an object, such as an agricultural product or the like, from a captured image, there has been a method of binarizing an image by comparing the visual feature of each pixel that is based on the captured image with a threshold. This visual feature may be, for example, data of a histogram image obtained by back-projecting the histogram of pixel values in a captured image.
Further, as a technique related to contour detection, there has been a technique that extracts contour points of ellipses from an input image, estimates the parameter of the ellipse for each contour point, and repeats processing for updating the parameter to a value that is consistent between the contour points. Then, the overlapping ellipses are separated, and the parameters are calculated.
Examples of the related art are disclosed in:
Japanese Laid-open Patent Publication No. 7-200774;
Japanese Laid-open Patent Publication No. 2001-344607;
Bruce Marshall, Mark W. Young, “Automated on-farm assessment of tuber size distribution”, Decision Support Systems in Potato Production: Bringing Models to Practice, Wageningen Pers, Jun. 30, 2004, pp. 101-117; and
Gary Bradski, Adrian Kaehler, “Learning OpenCV”, O'Reilly Japan, Inc., Aug. 24, 2009, pp. 561-562.
In order to calculate the area of each agricultural product based on an image representing a large number of agricultural products such as potatoes or the like, and thus to estimate the weight of each agricultural product based on the area, the contour of each agricultural product needs to be detected. It is assumed that, for this contour detection, the above-described method is used that binarizes an image by comparing the visual feature of each pixel that is based on the captured image with a threshold.
With this method, in the case where a plurality of objects, such as agricultural products, having similar appearances are adjacent to each other in an image, depending on the value of the threshold, there might be a problem that the contours of the adjacent objects are connected, or there might be a problem that the contour is detected inside the actual contour, resulting in an inward shift of the contour. It is difficult to solve these two problems at once. For example, if a single threshold is used, the contours of adjacent objects might be connected in one location, while there might be an inward shift of the contour in another location.